﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NP.Demo.Model;
using System.Data.SqlClient;
using NP.Demo.DAL.Base;

namespace NP.Demo.DAL
{
    public class CustomersUtil : IDAL<Customer>
    {
        public int Add(Customer info)
        {
            SqlParameter[] SqlParameters = {
               new SqlParameter("@Id", Guid.NewGuid()),
               new SqlParameter("@code", info.Code),
               new SqlParameter("@name", info.Name),
               new SqlParameter("@address", info.Address),
               new SqlParameter("@status", info.Status)
            };
            int retVal = SqlHelper.ExecuteNonQuery(SqlHelper.GetConnection(), "dbo.CustomerInsertProc", SqlParameters);

            return retVal;
        }

        public int Edit(Customer info)
        {
            throw new NotImplementedException();
        }

        public int Remove(Customer info)
        {
            throw new NotImplementedException();
        }

        public Customer GetById(Guid id)
        {
            throw new NotImplementedException();
        }

        public Customer SetInfo(System.Data.DataRow row)
        {
            throw new NotImplementedException();
        }
    }
}
